package com.m3958.firstgwt.server.camel;

import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.camel.component.jms.JmsComponent;

import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.google.inject.name.Named;
import com.google.inject.name.Names;


public class MyCamelModule extends AbstractModule {
	

	@Override
	protected void configure() {
      bind(ClonePageRouter.class);
      bind(Host2IdRouter.class);
      bind(SolrRouter.class);
      bind(String.class).annotatedWith(Names.named("activemq.brokerURL")).toInstance("tcp://0.0.0.0:61616?trace=false&soTimeout=60000");
	}
	
    @Provides
    JmsComponent jms(@Named("activemq.brokerURL") String brokerUrl) {
        return JmsComponent.jmsComponent(new ActiveMQConnectionFactory(brokerUrl));
    }
}
